﻿using System;
using System.Web;
using System.Data;
using System.Linq;
using System.Web.Services;
using System.Collections.Generic;

namespace WS
{
    using BLL;
    using DAL;
    using DAL.Entities;

    /// <summary>
    /// Summary description for Bussiness
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
    // [System.Web.Script.Services.ScriptService]
    public class Bussiness : System.Web.Services.WebService
    {
        #region Ứng viên
        UngvienBLL _bllUngvien = new UngvienBLL();

        [WebMethod]
        public DataTable Ungvien_Select()
        {
            return _bllUngvien.Select();
        }

        [WebMethod]
        public object Ungvien_Update(Ungvien obj)
        {
            return _bllUngvien.Update(obj);
        }

        [WebMethod]
        public object Ungvien_Update_Ketqua(Ungvien obj)
        {
            return _bllUngvien.Update_Ketqua(obj);
        }

        [WebMethod]
        public object Ungvien_Insert(Ungvien obj)
        {
            return _bllUngvien.Insert(obj);
        }

        [WebMethod]
        public object Ungvien_Delete(Guid id)
        {
            return _bllUngvien.Delete(id);
        }

        [WebMethod]
        public string Ungvien_Layma()
        {
            return _bllUngvien.Layma();
        }
        #endregion

        #region Chuyên môn
        ChuyenmonBLL _bllChuyenmon = new ChuyenmonBLL();

        [WebMethod]
        public DataTable Chuyenmon_Select_By_Ungvien(Guid id)
        {
            return _bllChuyenmon.Select_By_Ungvien(id);
        }

        [WebMethod]
        public DataTable Chuyenmon_Select_By_Ungvien_Id(Guid id)
        {
            return _bllChuyenmon.Select_By_Ungvien_Id(id);
        }

        [WebMethod]
        public object Chuyenmon_Delete(Guid id)
        {
            return _bllChuyenmon.Delete(id);
        }

        [WebMethod]
        public object Chuyenmon_Insert(Chuyenmon obj)
        {
            return _bllChuyenmon.Insert(obj);
        }

        [WebMethod]
        public object Chuyenmon_Update(Chuyenmon obj)
        {
            return _bllChuyenmon.Update(obj);
        }
        #endregion

        #region Huấn luyện
        HuanluyenBLL _bllHuanluyen = new HuanluyenBLL();

        [WebMethod]
        public DataTable Huanluyen_Select_By_Ungvien(Guid id)
        {
            return _bllHuanluyen.Select_By_Ungvien(id);
        }

        [WebMethod]
        public DataTable Huanluyen_Select_By_Ungvien_Id(Guid id)
        {
            return _bllHuanluyen.Select_By_Ungvien_Id(id);
        }

        [WebMethod]
        public object Huanluyen_Delete(Guid id)
        {
            return _bllHuanluyen.Delete(id);
        }

        [WebMethod]
        public object Huanluyen_Insert(Huanluyen obj)
        {
            return _bllHuanluyen.Insert(obj);
        }

        [WebMethod]
        public object Huanluyen_Update(Huanluyen obj)
        {
            return _bllHuanluyen.Update(obj);
        }
        #endregion

        #region Ngôn ngữ
        NgonnguBLL _bllNgonngu = new NgonnguBLL();

        [WebMethod]
        public DataTable Ngonngu_Select_By_Ungvien_Id(Guid id)
        {
            return _bllNgonngu.Select_By_Ungvien_Id(id);
        }

        [WebMethod]
        public object Ngonngu_Delete(Guid id)
        {
            return _bllNgonngu.Delete(id);
        }

        [WebMethod]
        public object Ngonngu_Insert(Ngonngu obj)
        {
            return _bllNgonngu.Insert(obj);
        }

        [WebMethod]
        public object Ngonngu_Update(Ngonngu obj)
        {
            return _bllNgonngu.Update(obj);
        }
        #endregion

        #region Vi tính
        VitinhBLL _bllVitinh = new VitinhBLL();

        [WebMethod]
        public DataTable Vitinh_Select_By_Ungvien_Id(Guid id)
        {
            return _bllVitinh.Select_By_Ungvien_Id(id);
        }

        [WebMethod]
        public object Vitinh_Delete(Guid id)
        {
            return _bllVitinh.Delete(id);
        }

        [WebMethod]
        public object Vitinh_Insert(Vitinh obj)
        {
            return _bllVitinh.Insert(obj);
        }

        [WebMethod]
        public object Vitinh_Update(Vitinh obj)
        {
            return _bllVitinh.Update(obj);
        }
        #endregion

        #region Kinh nghiệm
        KinhnghiemBLL _bllKinhnghiem = new KinhnghiemBLL();

        [WebMethod]
        public DataTable Kinhnghiem_Select_By_Ungvien_Id(Guid id)
        {
            return _bllKinhnghiem.Select_By_Ungvien_Id(id);
        }

        [WebMethod]
        public object Kinhnghiem_Delete(Guid id)
        {
            return _bllKinhnghiem.Delete(id);
        }

        [WebMethod]
        public object Kinhnghiem_Insert(Kinhnghiem obj)
        {
            return _bllKinhnghiem.Insert(obj);
        }

        [WebMethod]
        public object Kinhnghiem_Update(Kinhnghiem obj)
        {
            return _bllKinhnghiem.Update(obj);
        }
        #endregion

        #region Tham chiếu
        ThamchieuBLL _bllThamchieu = new ThamchieuBLL();

        [WebMethod]
        public DataTable Thamchieu_Select_By_Ungvien_Id(Guid id)
        {
            return _bllThamchieu.Select_By_Ungvien_Id(id);
        }

        [WebMethod]
        public object Thamchieu_Delete(Guid id)
        {
            return _bllThamchieu.Delete(id);
        }

        [WebMethod]
        public object Thamchieu_Insert(Thamchieu obj)
        {
            return _bllThamchieu.Insert(obj);
        }

        [WebMethod]
        public object Thamchieu_Update(Thamchieu obj)
        {
            return _bllThamchieu.Update(obj);
        }
        #endregion

        #region Phỏng vấn
        PhongvanBLL _bllPhongvan = new PhongvanBLL();

        [WebMethod]
        public int Phongvan_CountRows_OfUngvien(Guid Id)
        {
            return _bllPhongvan.CountRows_Of_Ungvien_Id(Id);
        }

        [WebMethod]
        public DataTable Phongvan_Select_TempTable()
        {
            return _bllPhongvan.Select_TempTable();
        }

        [WebMethod]
        public DataTable Phongvan_Select_By_Ungvien_Id(Phongvan pv)
        {
            return _bllPhongvan.Select_By_Ungvien_Id(pv);
        }

        [WebMethod]
        public object Phongvan_Insert(Phongvan pv)
        {
            return _bllPhongvan.Insert(pv);
        }

        [WebMethod]
        public object Phongvan_Update(Phongvan pv)
        {
            return _bllPhongvan.Update(pv);
        }

        [WebMethod]
        public object Phongvan_Delete(Guid Id)
        {
            return _bllPhongvan.Delete(Id);
        }
        #endregion
    }
}